package com.gmail.dmitryustimov.ms.java7.observer.classic.demo.subj1subsc1event1;

import java.util.ArrayList;
import java.util.List;

public class Demo {

    private static final int NUM_SUBSCRIBERS = 1;
    private static final int NUM_UPDATES = 100000;

    public static void main(String[] args) {

        Subject subject = new Subject();
        List<Subscriber> subscriberList = new ArrayList<>();

        for (long i = 0; i < NUM_SUBSCRIBERS; i++) {
            subscriberList.add(new Subscriber(subject, "Subscriber" + i));
        }

        for (long j = 0; j < NUM_UPDATES; j++) {
            subject.makeEvent();
        }
    }
}
